<include file="Public:header"/>
<div id="right">
	<div>
		<h2>
			<if condition="empty($_GET['what']) || $_GET['what'] eq 'in'">
				我收到的纸条 
			<else />	
				<a href="{YICMS::U('User/Index/msg?what=in')}">我收到的纸条</a> 
			</if>
			<if condition="$_GET['what'] eq 'out'">
				发出去的纸条 
			<else />	
				<a href="{YICMS::U('User/Index/msg?what=out')}">发出去的纸条</a> 
			</if>
			<if condition="$_GET['what'] eq 'new'">
				写新纸条 
			<else />	
				<a href="{YICMS::U('User/Index/msg?what=new')}">写新纸条</a> 
			</if>
		</h2>
		<switch name="Think.get.what" >
			<case value="out">
				<volist name="msg" id="vo">
					<ul>
						<li>
							<span class="user">发给： <a href="{YICMS::U('User/Index/index?uid='.$vo['to_uid'])}">{YICMS:$vo.to_uname}</a></span> 
							<span class="time">{YICMS:$vo.time|switchtime=###}</span><br/>
							内容：{YICMS:$vo.msg}
						</li>
					</ul>
				</volist>	
			</case>
			<case value="new">
				<p></p>
				<p></p>
				<form action="{YICMS::U('User/Index/checkMsg')}" method="post">
					<label for="to_uname">写给：</label>
					<input id="to_uname" name="to_uname" autocomplete="off">
					<p></p>
					<p>
						<label for="msg">正文：</label><br>
						<textarea id="msg" name="msg" style="height:50px;width:300px"></textarea>
					</p>
					<p>
					<input name="commit" type="submit" value="发送" style="padding:3px;"/>
					</p>
				</form>
			</case>
			<default />
				<volist name="msg" id="vo">
					<ul>
						<li>
							<span class="user">来自： <a href="{YICMS::U('User/Index/index?uid='.$vo['from_uid'])}">{YICMS:$vo.from_uname}</a></span> 
							<span class="time">{YICMS:$vo.time|switchtime=###}</span><br/>
							内容：{YICMS:$vo.msg}
						</li>
					</ul>
				</volist>	
		</switch>
	</div>
	<div class="pagination">
		{YICMS:$page}
	</div>

</div>
<include file="Public:footer"/>